package com.hn.feign;

import com.hn.fallback.CnUserClientFallBack;
import com.hn.model.CnUser;

import java.util.List;
import java.util.Map;

import com.hn.config.CnConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;
/**
* Created by shang-pc on 2018/5/15.
*/
@FeignClient(name = "provider-service",url ="http://localhost:8762/" ,configuration = CnConfiguration.class, fallback = CnUserClientFallBack.class)
public interface RestCnUserClient {
@RequestMapping(value = "/getCnUserById",method = RequestMethod.POST)
public CnUser getCnUserById(@RequestParam("id") String id)throws Exception;

@RequestMapping(value = "/getCnUserListByMap",method = RequestMethod.POST)
public List<CnUser>	getCnUserListByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/getCnUserCountByMap",method = RequestMethod.POST)
public Integer getCnUserCountByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/addUser",method = RequestMethod.POST)
public Integer addUser(@RequestBody CnUser cnUser)throws Exception;

@RequestMapping(value = "/qdtxModifyCnUser",method = RequestMethod.POST)
public Integer qdtxModifyCnUser(@RequestBody CnUser cnUser)throws Exception;
}

